package com.firesrc.service.impl;

import java.util.List;

import com.firesrc.bean.MailSubject;
import com.firesrc.dao.MailSubjectDao;
import com.firesrc.dao.impl.MailSubjectDaoImpl;
import com.firesrc.service.MailSubjectService;

public class MailSubjectServiceImpl implements MailSubjectService {

	private MailSubjectDao dao;

	public MailSubjectServiceImpl() {
		dao = new MailSubjectDaoImpl();
	}

	@Override
	public void add(MailSubject mailSubject) {
		dao.add(mailSubject);
	}

	@Override
	public List<MailSubject> getAllList() {
		return dao.getAllList(new MailSubject());
	}

	@Override
	public void delete(String id) {
		MailSubject subject = new MailSubject();
		subject.setId(id);
		dao.delete(subject);

	}

}
